package com.zdar.screens;


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.zdar.Zdar;

public class MainMenuScreen implements Screen {

	final Zdar game;
	
	OrthographicCamera camera;
	
	public MainMenuScreen(Zdar game){
		this.game = game;
		
		camera = new OrthographicCamera();
		camera.setToOrtho(false, 1280, 720);	//TODO move this somewhere else
	}
	
	
	@Override
	public void render(float delta) {
		Gdx.gl.glClearColor(0, 0, 0.2f, 1);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		
		camera.update();
		game.batch.setProjectionMatrix(camera.combined);
		
		game.batch.begin();
		game.font.draw(game.batch, "Yo bitch it zdar", 100, 150);
		game.font.draw(game.batch, "press to start or somesthing", 100, 100);
		game.batch.end();
		
		if(Gdx.input.isTouched()){	//is this only for Android?
			game.setScreen(new GameScreen(game));
			dispose();
		}
	}

	@Override
	public void resize(int width, int height) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

}
